package com.quandou.sail.config;

import com.quandou.base.security.AuthorizeConfigProvider;
import org.springframework.core.annotation.Order;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.stereotype.Component;

@Component
@Order(value = -1)
public class TestProvider implements AuthorizeConfigProvider {
    @Override
    public void config(HttpSecurity httpSecurity) throws Exception {
        httpSecurity.authorizeRequests().
                antMatchers("/admin").hasRole("ADMIN");
    }
}
